class THResult<T> {
  bool success = true;
  String msg = 'success';
  T? data;
  dynamic rawData;
  Map? result;
  THResult();
  THResult.fromJson(Map? json) {
    result = json;
    if (json == null) {
      success = false;
      msg = 'Json Empty';
    } else {
      if (json["success"] is bool) {
        success = json["success"];
      } else {
        success = false;
      }
      if (json["msg"] is String) {
        msg = json["msg"];
      }
      if (json["data"] != null) {
        rawData = json["data"];
      }
    }
  }
}
